home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / virus / vchk716.lha / Virus_Checker / Install_Virus_Checker next >
Text File  |  1995-08-27  |  6KB  |  269 lines

  1. ; $VER: Virus_Checker Install 7.15 (22.8.95)
  2. ; Script to install Virus_Checker
  3.  
  4. (set @app-name "Virus_Checker")
  5. ; 0% complete
  6. (complete 0)
  7. (user 2)
  8.  
  9. (set default_dev
  10.     (askdir
  11.         (prompt "Which Drive should Virus_Checker be installed?\n"
  12.                         "A directory called Virus_Checker will be created here.")
  13.         (help   "This section lets you choose on which drive"
  14.                 " Virus_Checker files should be installed.\n\n"
  15.                 @askdir-help
  16.         )
  17.         (default "SYS:")
  18.     )
  19. )
  20.  
  21. ;Make Name for us eg SYS:Virus_Checker
  22.  
  23. (set @default-dest (tackon default_dev "Virus_Checker"))
  24.  
  25. ;Make dir if it does not exist
  26.  
  27. (if (not (exists (@default-dest)))
  28.     (makedir @default-dest)
  29. )
  30.  
  31. ;copy drawer icon if it does not exists
  32.  
  33. (if (not (exists (cat @default-dest ".info")))
  34.     (run (cat "copy /Virus_Checker.info to " default_dev))
  35. )
  36.  
  37. (complete 10)
  38. (working "Installing BootBlock.library")
  39. (copylib
  40.     (prompt "Installin Bootblock.library to LIBS:")
  41.     (help @copylib-help)
  42.     (source "libs/BootBlock.library")
  43.     (dest "LIBS:")
  44.     (confirm)
  45. )
  46.  
  47. (copyfiles
  48.     (prompt "Copying Brainfiles to L:")
  49.     (help @copyfiles-help)
  50.     (source "l")
  51.     (choices "Bootblock.brainfile")
  52.     (dest "L:")
  53.     (confirm)
  54. )
  55. (complete 20)
  56. (working "Installing  unpack.library")
  57. (copylib
  58.     (prompt "Copying unpack.library to LIBS:")
  59.     (help @copylib-help)
  60.     (source "libs/unpack.library")
  61.     (dest "libs:")
  62.     (confirm)
  63. )
  64.  
  65. (complete 30)
  66. (working "Copying xfdmaster.library to LIBS:")
  67. (copylib
  68.     (prompt "Copying xfdmaster.library to LIBS:")
  69.     (help @copylib-help)
  70.     (source "libs/xfdmaster.library")
  71.     (dest "libs:")
  72.     (confirm)
  73. )
  74.  
  75. (set brain (exists ("L:VirusChecker.brain")))
  76.  
  77. (if (<> brain 0)
  78.     (set libvernum (getversion ("L:VirusChecker.brain")))
  79.     (set libver (/ libvernum 65536))
  80.     (set librev (- libvernum (* libver 65536)))
  81.     (set libverstr ("%ld.%ld" libver librev))
  82. )
  83.  
  84. (set flag
  85.     (askbool
  86.         (prompt (cat
  87.            "\nI have found version " libverstr "\n"
  88.            "of the VirusChecker.brain in L:\n\n"
  89.            "If you are running Virus_Checker from the\n"
  90.            "directory you installed it then select Remove It\n"
  91.            "If you are running it from Workbench then it will\n"
  92.            "be copied over anyway\n\n"
  93.            "Shall I remove it?"))
  94.         (help @message-help)
  95.         (choices "Leave It" "Remove It")
  96.         (default 0)
  97.     )
  98. )
  99.  
  100.  
  101. (if (= flag 0) (delete "L:VirusChecker.brain"))
  102.  
  103. (complete 40)
  104. (copyfiles
  105.     (prompt "Shall I install the XFD extra crunchers")
  106.     (help @copyfiles-help)
  107.     (source "libs/XFD")
  108.     (dest "LIBS:XFD")
  109.     (all)
  110.     (confirm)
  111. )
  112. (complete 50)
  113. (working "Copying Main files to selected Directory")
  114. (copyfiles
  115.     (prompt "I will now copy the main files")
  116.     (help @copyfiles-help)
  117.     (source "")
  118.     (choices "Virus_Checker.guide"
  119.         "Virus_Checker.guide.info"
  120.         "NZ_VC.bsh"
  121.         "Install_Virus_Checker"
  122.         "Install_Virus_Checker.info"
  123.         "Virus_Checker"
  124.         "Virus_Checker.info"
  125.         "VirusChecker.brain"
  126.         "MakeKey"
  127.         "MakeKey.info"
  128.         "Arexx"
  129.         "catalogs"
  130.     )
  131.     (dest @default-dest)
  132.     (confirm)
  133. )
  134. (complete 60)
  135.  
  136. ;Get where to run from 0 = s:user-startup, 1 = WBStartup, 2 = none
  137. (set install_where
  138.     (askchoice
  139.         (prompt "Where would you like to run Virus_Checker from?")
  140.         (help "Best place is the s:User-Startup")
  141.         (choices "S:User-Startup"
  142.             "SYS:WBStartup"
  143.             "Manually Run")
  144.         (default 0)
  145.     )
  146. )
  147.  
  148. (set cmd (tackon @default-dest "Virus_Checker"))
  149.  
  150. (complete 70)
  151. (if (= install_where 0)
  152.     (startup @app-name
  153.         (prompt "I need to add the following line to your S:User-Startup file\n\n"
  154.             cmd)
  155.         (help @startup-help)
  156.         (command cmd)
  157.     )
  158. )
  159.  
  160. (complete 80)
  161. (if (not (= install_where 1))
  162.     (if (exists ("SYS:WBStartup/Virus_Checker"))
  163.     (if 
  164.     (askbool
  165.         (prompt "I have found that you have Virus_Checker"
  166.             "in your SYS:WBStartup.\n"
  167.             "As you have not selected WBStartup this "
  168.             "file should be deleted"
  169.           )
  170.         (help @message-help)
  171.         (choices "Delete It" "Leave it")
  172.         (default 0)
  173.     )
  174.     (run ("delete SYS:WBStartup/Virus_Checker#?"))
  175.     )
  176.     )
  177. )
  178.  
  179.  
  180.  
  181. (complete 90)
  182. (if (= install_where 1)
  183.     (askbool
  184.         (prompt "For this to work I will need to copy "
  185.             "some files that would\n"
  186.             "normally be in PROGDIR: to the default places.\n"
  187.             "These are\n"
  188.             "VirusChecker.brain to L:\n"
  189.             "catalogs to LOCALE:catalogs\n"
  190.           )
  191.         (help @message-help)
  192.         (choices "Okay" "Okay")
  193.         (default 0)
  194.     )
  195. )
  196.  
  197. (if (= install_where 1)
  198.     (copyfiles
  199.         (prompt "Copying Virus_Checker.brain to L:")
  200.         (help @copyfiles-help)
  201.         (source "VirusChecker.brain")
  202.         (dest "L:")
  203.         (confirm)
  204.     )
  205. )
  206. (if (= install_where 1)
  207.     (copyfiles
  208.         (prompt "Copying catalogs to LOCALE:catalogs")
  209.         (help @copyfiles-help)
  210.         (source "catalogs")
  211.         (dest "locale:")
  212.         (all)
  213.     )
  214. )
  215. (if (= install_where 1)
  216.     (copyfiles
  217.         (prompt "Copying Virus_Checker to SYS:WBStartup")
  218.         (help @copyfiles-help)
  219.         (source "")
  220.         (choices "Virus_Checker"
  221.             "Virus_Checker.info")
  222.         (dest "SYS:WBStartup")
  223.         (confirm)
  224.     )
  225. )
  226. (if (= install_where 1)
  227.     (copyfiles
  228.         (prompt "Copying Virus_Checker to SYS:WBStartup")
  229.         (help @copyfiles-help)
  230.         (source "Virus_Checker.info")
  231.         (dest "SYS:WBStartup")
  232.     )
  233. )
  234.  
  235. (set helpex (exists ("HELP:english/Virus_Checker.guide")))
  236.  
  237. (if (<> helpex 0)
  238.     (delete "HELP:english/Virus_Checker.guide")
  239.     (delete "HELP:english/NZ_VC.bsh")
  240.     
  241. )
  242.  
  243.  
  244. (if (= install_where 1)
  245.     (copyfiles
  246.         (Prompt "If you want online help then I need to install "
  247.             "the file Virus_Checker.guide into HELP:english/")
  248.         (help @copyfiles-help)
  249.         (source "")
  250.         (choices "Virus_Checker.guide"
  251.             "NZ_VC.bsh")
  252.         (dest "HELP:english")
  253.         (confirm)
  254.     )
  255. )
  256.  
  257. (complete 100)
  258. (askbool
  259.     (prompt "Remember that Virus_Checker is SHAREWARE.\n"
  260.         "Please support the SHAREWARE concept and the author. "
  261.         "If you have not done so please read the Virus_Checker.guide "
  262.         "file now and check out the History part for changes/updates."
  263.     )
  264.     (help "Just read it")
  265.     (choices "Thank You" "Thank You")
  266.     (default 0)
  267. )
  268. (exit)
  269.